package com.alex;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 * 测试MQ的FQA
 */
public class TestMQFAQ {

    public static void main(String[] args) {
        System.out.println(validatedGroup("GOME_DHR"));
    }

    private static boolean validatedGroup(String group) {
        if (group == null) {
            return true;
        }

        Pattern pattern = Pattern.compile("^[%|a-zA-Z0-9_-]+$");
        Matcher matcher = pattern.matcher(group);
        return matcher.matches();
    }
}
